import { request } from "@/utils/request";

// 收藏榜
export const collectList = (data: any = {}) => {
  return request({
    url: "/commodity/collectList",
    method: "POST",
    data,
  });
};
// 添加收藏
export const apiCollectAdd = (data: any = {}) => {
  return request({
    url: "/collect/add",
    method: "POST",
    data,
  });
};

export const apiCollectDel = (data: any = {}) => {
  return request({
    url: "/collect/del",
    method: "POST",
    data,
  });
};

export const appCommentAdd = (data: any = {}) => {
  return request({
    url: "/AppComment/add",
    method: "POST",
    data,
  });
};

export const appCommentList = (data: any = {}) => {
  return request({
    url: "/AppComment/List",
    method: "POST",
    data,
  });
};

// 我的收藏-查询列表 http://localhost:8080/leshi/commodity/getMycollect

export const getMycollect = (data: any = {}) => {
  return request({
    url: "/commodity/getMycollect",
    method: "POST",
    data,
  });
};

// 取消收藏 http://localhost:8080/leshi/collect/del

export const delMycollect = (data: any = {}) => {
  return request({
    url: "/collect/del",
    method: "POST",
    data,
  });
};

export const appCommentDel = (data: any = {}) => {
  return request({
    url: "/AppComment/del",
    method: "POST",
    data,
  });
};